<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title)">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title th:replace="${title}">后台台公共页面</title>
    <!-- Main CSS-->
    <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" href="../static/css/main.css">
    <!-- Font-icon css-->
    <link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap-icons.min.css}"
          href="../static/css/bootstrap-icons.min.css">
    <link rel="stylesheet" type="text/css" th:href="@{/css/style.css}" href="../static/css/style.css">
    <!--轻量弹窗-->
    <link rel="stylesheet" type="text/css" th:href="@{/lib/toastr/toastr.min.css}" href="../static/lib/toastr/toastr.min.css">
    <!--多项框-->
    <link rel="stylesheet" type="text/css" th:href="@{/lib/bootstrap-select/bootstrap-select.css}" href="../static/lib/bootstrap-select/bootstrap-select.css">
    <!--校验-->
    <link rel="stylesheet" type="text/css" th:href="@{/lib/bootstrap-select/bootstrap-select.css}" href="../static/lib/bootstrapValidator/bootstrapValidator.min.css">
    <!--下拉列表-->
    <link rel="stylesheet" type="text/css" th:href="@{/lib/bootstrap-select/bootstrap-select.css}" href="../static/lib/bootstrap-select/bootstrap-select.css">
</head>
<body>
<!--导航-->
<header th:fragment="header">
    <!-- Navbar-->
    <header class="app-header"><a class="app-header__logo" th:href="@{/}">ZMovie</a>
        <!-- Sidebar toggle button--><a class="app-sidebar__toggle" href="#" data-toggle="sidebar"
                                        aria-label="Hide Sidebar"></a>
        <!-- Navbar Right Menu-->
        <ul class="app-nav">
            <li class="app-search">
                <input class="app-search__input" type="search" placeholder="Search">
                <button class="app-search__button"><i class="bi bi-search"></i></button>
            </li>

            <!-- User Menu-->
            <li class="dropdown"><a class="app-nav__item" href="#" data-bs-toggle="dropdown"
                                    aria-label="Open Profile Menu"><i
                    class="bi bi-person fs-4"></i></a>
                <ul class="dropdown-menu settings-menu dropdown-menu-right">
                    <li><a class="dropdown-item" href="#"><i class="bi bi-gear me-2 fs-5"></i> 设置</a>
                    </li>
                    <li><a class="dropdown-item" th:href="@{/logout.do}"><i class="bi bi-box-arrow-right me-2 fs-5"></i>
                        登出</a>
                    </li>
                </ul>
            </li>
        </ul>
    </header>
</header>
<!--菜单-->
<aside th:fragment="menu(nav, item)" class="app-sidebar">
    <div class="app-sidebar__user"><img class="app-sidebar__user-avatar" th:src="@{/images/me.jpg}"  src="../static/images/me.jpg"
                                        alt="User Image">
        <div>
            <p class="app-sidebar__user-name">Dylan</p>
            <p class="app-sidebar__user-designation">Backend Developer</p>
        </div>
    </div>
    <ul class="app-menu">
        <!-- 仪表盘 -->
        <li>
            <a class="app-menu__item" th:classappend="${nav == 0} ? 'active'" th:href="@{/}">
                <i class="app-menu__icon bi bi-speedometer"></i>
                <span class="app-menu__label">仪表盘</span>
            </a>
        </li>
        <!-- 影院管理 -->
        <li class="treeview" th:classappend="${nav == 1} ? 'is-expanded'">
            <a class="app-menu__item" th:classappend="${nav == 1} ? 'active'" th:href="@{/cinema/info}" data-toggle="treeview">
                <i class="app-menu__icon bi bi-house"></i>
                <span class="app-menu__label">影院管理</span>
                <i class="treeview-indicator bi bi-chevron-right"></i>
            </a>
            <ul class="treeview-menu">
                <li>
                    <a class="treeview-item" th:classappend="${nav == 1 && item == 1} ? 'active'" th:href="@{/cinema/info}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        影院信息管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 1 && item == 2} ? 'active'" th:href="@{/cinema/area}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        影院区域管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 1 && item == 3} ? 'active'" th:href="@{/cinema/brand}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        影院品牌管理
                    </a>
                </li>
            </ul>
        </li>
        <!-- 电影管理 -->
        <li class="treeview" th:classappend="${nav == 2} ? 'is-expanded'">
            <a class="app-menu__item" href="#" data-toggle="treeview">
                <i class="app-menu__icon bi bi-camera-reels"></i>
                <span class="app-menu__label">电影管理</span>
                <i class="treeview-indicator bi bi-chevron-right"></i>
            </a>
            <ul class="treeview-menu">
                <li>
                    <a class="treeview-item" th:classappend="${nav == 2 && item == 1} ? 'active'" th:href="@{/movie/info}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        电影信息管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 2 && item == 2} ? 'active'" th:href="@{/movie/comment}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        电影评论管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 2 && item == 3} ? 'active'" th:href="@{/movie/age}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        电影年代管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 2 && item == 4} ? 'active'" th:href="@{/movie/area}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        电影区域管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 2 && item == 5} ? 'active'" th:href="@{/movie/type}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        电影类别管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 2 && item == 6} ? 'active'" th:href="@{/movie/runtime}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        电影播放时段管理
                    </a>
                </li>
            </ul>
        </li>
        <!-- 影厅管理 -->
        <li class="treeview" th:classappend="${nav == 3} ? 'is-expanded'">
            <a class="app-menu__item" href="#" data-toggle="treeview">
                <i class="app-menu__icon bi bi-bank"></i>
                <span class="app-menu__label">影厅管理</span>
                <i class="treeview-indicator bi bi-chevron-right"></i>
            </a>
            <ul class="treeview-menu">
                <li>
                    <a class="treeview-item" th:classappend="${nav == 3 && item == 1} ? 'active'" th:href="@{/hall/info}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        影厅信息管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 3 && item == 2} ? 'active'" th:href="@{/hall/type}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        影厅类别管理
                    </a>
                </li>
            </ul>
        </li>
        <!-- 场次管理 -->
        <li class="treeview" th:classappend="${nav == 4} ? 'is-expanded'">
            <a class="app-menu__item" href="#" data-toggle="treeview">
                <i class="app-menu__icon bi bi-bell"></i>
                <span class="app-menu__label">场次管理</span>
                <i class="treeview-indicator bi bi-chevron-right"></i>
            </a>
            <ul class="treeview-menu">
                <li>
                    <a class="treeview-item" th:classappend="${nav == 4 && item == 1} ? 'active'" th:href="@{/session/info}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        场次信息管理
                    </a>
                </li>
            </ul>
        </li>
        <!-- 演员管理 -->
        <li class="treeview" th:classappend="${nav == 5} ? 'is-expanded'">
            <a class="app-menu__item" href="#" data-toggle="treeview">
                <i class="app-menu__icon bi bi-people"></i>
                <span class="app-menu__label">演员管理</span>
                <i class="treeview-indicator bi bi-chevron-right"></i>
            </a>
            <ul class="treeview-menu">
                <li>
                    <a class="treeview-item" th:classappend="${nav == 5 && item == 1} ? 'active'" th:href="@{/actor/info}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        演员信息管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 5 && item == 2} ? 'active'" th:href="@{/actor/role}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        演员角色管理
                    </a>
                </li>
            </ul>
        </li>
        <!-- 用户管理 -->
        <li class="treeview" th:classappend="${nav == 6} ? 'is-expanded'">
            <a class="app-menu__item" href="#" data-toggle="treeview">
                <i class="app-menu__icon bi bi-person"></i>
                <span class="app-menu__label">用户管理</span>
                <i class="treeview-indicator bi bi-chevron-right"></i>
            </a>
            <ul class="treeview-menu">
                <li>
                    <a class="treeview-item" th:classappend="${nav == 6 && item == 1} ? 'active'" th:href="@{/user/info}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        用户信息管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 6 && item == 2} ? 'active'" th:href="@{/user/order}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        订单信息管理
                    </a>
                </li>
                <li>
                    <a class="treeview-item" th:classappend="${nav == 6 && item == 3} ? 'active'" th:href="@{/user/role}">
                        <i class="app-menu__item bi  bi-stars"></i>
                        用户角色管理
                    </a>
                </li>
            </ul>
        </li>
    </ul>
</aside>

<!--js-->
<th:block th:fragment="script">
    <script th:src="@{/js/jquery-3.7.0.min.js}" src="../static/js/jquery-3.7.0.min.js"></script>
    <script th:src="@{/js/bootstrap.min.js}" src="../static/js/bootstrap.min.js"></script>
    <script th:src="@{/js/main.js}" src="../static/js/main.js"></script>
    <script th:src="@{/lib/toastr/toastr.min.js}" src="../static/lib/toastr/toastr.min.js"></script>
    <script th:src="@{/lib/bootstrap-select/bootstrap-select.min.js}" src="../static/lib/bootstrap-select/bootstrap-select.min.js"></script>
    <script th:src="@{/lib/bootstrapValidator/bootstrapValidator.min.js}" src="../static/lib/bootstrapValidator/bootstrapValidator.min.js"></script>
    <script th:src="@{/lib/sweetalert.min.js}" src="../static/lib/sweetalert.min.js"></script>
    <script th:src="@{/lib/bootstrap-select/bootstrap-select.min.js}" src="../static/lib/bootstrap-select/bootstrap-select.min.js"></script>
    <script th:src="@{/lib/bootstrap-select/defaults-zh_CN.min.js}" src="../static/lib/bootstrap-select/defaults-zh_CN.min.js"></script>
</th:block>

</body>
</html>